from ultralytics import YOLO

model = YOLO('runs/detect/train8/weights/best.pt')


# Evaluate model performance on the validation set
metrics = model.predict()

# Perform object detection on an image
results = model("datasets/Drawing Annotation Recognition2.v1i.yolov12/test/images"
"/Untitled_png.rf.d59ec9e6949e043c86f6c3ad8e33bcd6.jpg")
for result in results:
    boxes = result.boxes  # 获取所有检测框
    for box in boxes:
        print("Bounding Box Coordinates:", box.xyxy)  # 打印坐标
